<template>
  <div id="showContent">
    <el-dialog
      title="内容详情"
      :visible.sync="dialogData.isShow"
      width="500px"
      :before-close="labelHandleClose"
    >
      <span class="conImg" v-html="filterContent(content)">{{ content }}</span>
    </el-dialog>
  </div>
</template>

<script>
import { contentToStr } from '@utils/pubFunction'
export default {
  name: 'showContent',
  msg: '聚合内容展示-内容',
  props: ['dialogData'],
  data() {
    return {
      content: ''
    }
  },
  mounted() {
    this.content = this.dialogData.content
  },
  methods: {
    labelHandleClose(done) {
      this.cancelLabel()
      done()
    },
    cancelLabel() {
      // 关闭前清空
      this.loading = false
      this.dialogData.isShow = false
    },
    /* 过滤返回评论内容 */
    filterContent(item) {
      return contentToStr(item)
    }
  }
}
</script>

<style lang="less">
#showContent {
  .conImg {
    img {
      width: 100%;
    }
  }
}
</style>
